package com.code.soulspring.callback;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 任务调度，调度具体线程去采集设备数据
 * @author lyf
 * @date 2022-09-26 22:39
 */
@Service
public class ScheduleTask {

    @Resource(name = "statusCallback")
    private Callback callback;

    @Autowired
    private TaskJob taskJob;

    public void schedule() {
        taskJob.run(callback);
    }
}
